var commodity = {
	title : "Commodity Quote",
	sections : {
		core : {
			title : "Quote",
			components : [{
				type : "form",
				contents : [{
					schema : {
						ric : {
							back : "ASSET.RIC",
							label : "RIC",
							type : "Text",
							validators : ['required']
						},
						category : {
							back : "ASSET.ASSETCATEGORY",
							label : "Category",
							type : "ViewDiv",
							hasMeaning : true
						},
						permid : {
							back : "ASSET.PERMID",
							label : "PERMID",
							type : "Text",
							readOnly : true
						},
						tag : {
							back : "ASSET.TAG",
							label : "Tag",
							type : "Text",
							readOnly : true
						},
						state : {
							back : "ASSET.ASSETSTATE",
							label : "Asset State",
							type : "ViewDiv"
						},
						retireDate : {
							back : "ASSET.RETIREDATE",
							label : "Retire Date",
							type : "jqueryui.Date",
							validators : [/*'required',*/
							{
								type : "dateFormat",
								format : "dd-MM-yyyy"
							}]
						},
						currency : {
							back : "ASSET.QUOTATIONCURRENCY",
							label : "Currency",
							type : "SelectDropdown",
							elem_id : "currency",
							actions : [0, 1, 2, 3],
							clearable : false
						},
						exchange : {
							back : "ASSET.QUOTATIONGROUPEDBYPSEUDOEXCH",
							label : "Exchange",
							type : "SelectDropdown",
							elem_id : "exchange",
							actions : [0, 1, 2, 3],
							clearable : false/*, validators: ['requiredResult']*/
						},
						trades : {
							back : "ASSET.TRADES",
							label : "",
							type : "Accessory"
						},
						sourceType : {
							back : "ASSET.TRADES.SOURCETYPE",
							label : "Source Type",
							type : "ViewDiv"
						},
						sourceName : {
							back : "ASSET.TRADES.COMMONNAME",
							label : "Source Name",
							type : "ViewDiv"
						},
						priceUnit : {
							back : "COMMODITY.PRICINGUNIT",
							label : "Price Unit",
							type : "SelectDropdown",
							elem_id : "priceUnit"
						},
						btuPerBarrel : {
							back : "COMMODITY.BTUPERBARREL",
							label : "BTU per Barrel",
							type : "DigitNumber"
						},
						barrelsPerTon : {
							back : "COMMODITY.BARRELSPERTON",
							label : "Barrels Per Ton",
							type : "DigitNumber"
						}
					}
				}]
			}]
		},
		ladder : {
			title : "Ladder",
			components : [{
				type : "table",
				id : "TICKLADDER",
				caption : "Tick Ladder Assignment",
				history : true,
				actions : [1, 2, 3, 4],
				cols : [{
					name : "Flag",
					field : "flag",
					type : "Boolean",
					editable : true,
					editType : "Checkbox"
				}, {
					name : "Name",
					field : "name",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Effective From",
					field : "effective_from",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Effective To",
					field : "effective_to",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Price Indicator",
					field : "price_indicator",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Meaning",
					field : "meaning",
					type : "String",
					editable : true,
					editType : "Textarea"
				}, {
					name : "Begin Date",
					field : "begin_date",
					type : "Date"
				}]
			}, {
				type : "table",
				id : "LOTLADDER",
				caption : "Lot Ladder Assignment",
				history : true,
				actions : [1, 2, 3, 4],
				cols : [{
					name : "Flag",
					field : "flag",
					type : "Boolean",
					editable : true,
					editType : "Checkbox"
				}, {
					name : "Name",
					field : "name",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Effective From",
					field : "effective_from",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Effective To",
					field : "effective_to",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Price Indicator",
					field : "price_indicator",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Meaning",
					field : "meaning",
					type : "String",
					editable : true,
					editType : "Textarea"
				}, {
					name : "Begin Date",
					field : "begin_date",
					type : "Date"
				}]
			}]
		},
		name : {
			title : "Name",
			components : [{
				type : "table",
				id : "NAME",
				caption : "Name",
				history : true,
				actions : [1, 2, 3, 4],
				cols : [{
					name : "Property",
					field : "type",
					type : "String",
					editable : true,
					editType : "SelectDropdown"
				}, {
					name : "Value",
					field : "value",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Begin Date",
					field : "begin_date",
					type : "Date"
				}]
			}, {
				type : "table",
				id : "localLanguageName",
				caption : "Local Language Name",
				history : true,
				actions : [1, 2, 3, 4],
				cols : [{
					name : "Flag",
					field : "flag",
					type : "Boolean",
					editable : true,
					editType : "Checkbox"
				}, {
					name : "Property",
					field : "property",
					type : "String",
					editable : true,
					editType : "SelectDropdown"
				}, {
					name : "Language Code",
					field : "language_code",
					type : "String",
					editable : true,
					editType : "SelectDropdown"
				}, {
					name : "Value",
					field : "value",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Transliterated Name",
					field : "transliterated_name",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Begin Date",
					field : "begin_date",
					type : "Date"
				}]
			}]
		},
		identifier : {
			title : "Identifier",
			components : [{
				type : "table",
				id : "IDENTIFIER",
				caption : "Identifier",
				history : true,
				actions : [1, 2, 3, 4],
				cols : [{
					name : "Property",
					field : "type",
					type : "String",
					editable : true,
					editType : "SelectDropdown"
				}, {
					name : "Value",
					field : "value",
					type : "String",
					editable : true,
					editType : "Text"
				}, {
					name : "Begin Date",
					field : "begin_date",
					type : "Date"
				}]
			}]
		},
		clsSchema : {
			title : "Classification Schema",
			components : [{
				type : "table",
				id : "CLASSIFICATIONSCHEME",
				caption : "Classification Schema",
				history : true,
				actions : [1, 2, 3, 4],
				cols : [{
					name : "Property",
					field : "type",
					type : "String",
					editable : true,
					editType : "SelectDropdown"
				}, {
					name : "Value",
					field : "value",
					type : "String",
					editable : true,
					editType : "SelectDropdown_c",
					classifier : "ASSET.CLASSIFIER"
				}, {
					name : "Meaning",
					field : "meaning",
					type : "String",
					relative : "value",
					editable : true,
					editType : "Content"
				}, {
					name : "Begin Date",
					field : "begin_date",
					type : "Date"
				}]
			}]
		},
		sedol : {
			title : "SEDOL Secondary Quote Relationship", ////////////////
			alias : "SEDOL",
			components : [{
				type : "form",
				contents : [{
					title : "SEDOL Maintenance",
					schema : {
						sedol_value : {
							back : "ASSET.SEDOLVALUE",
							label : "Value",
							type : "Text"
						},
						sedol_begin_date : {
							back : "ASSET.SEDOLBEGINDATE",
							label : "Begin Date",
							type : "Text",
							readOnly : true
						},
						sedol_setPri : {
							back : "ASSET.SEDOLPRIMARY",
							label : "Set Primary",
							type : "Checkbox"
						}
					}
				}, {
					title : "ISE OPOL Maintenance",
					schema : {
						opol_value : {
							back : "ASSET.OPOLVALUE",
							label : "Value",
							type : "Text",
							readOnly : true
						},
						opol_meaning : {
							back : "ASSET.OPOLMEANING",
							label : "Meaning",
							type : "Text",
							readOnly : true
						},
						opol_begin_date : {
							back : "ASSET.OPOLBEGINDATE",
							label : "Begin Date",
							type : "Text",
							readOnly : true
						}
					}
				}, {
					title : "Common",
					schema : {
						sedol_commonname : {
							back : "ASSET.SEDOLCOMMONNAME",
							label : "Common Name",
							type : "Text"
						},
						sedol_mic : {
							back : "ASSET.MIC",
							label : "MIC",
							type : "SelectDropdown",
							elem_id : "mic"
						}
					}
				}]
			}, {
				type : "table",
				id : "sedol",
				caption : "SEDOL Secondary Quote Relationship",
				history : true,
				readOnly : true,
				cols : [{
					name : "RIC",
					field : "ric",
					type : "String"
				}, {
					name : "Asset State",
					field : "asset_state",
					type : "String"
				}, {
					name : "Common Name",
					field : "common_name",
					type : "String"
				}, {
					name : "MIC",
					field : "mic",
					type : "String"
				}, {
					name : "Target Listing",
					field : "target_listing",
					type : "Checkbox"
				}]
			}]
		},
		refData : {
			title : "Search Reference Data", ////////////////
			alias : "Reference Data",
			components : [{
				type : "table",
				id : "pageric",
				caption : "Page RIC",
				actions : [2, 4],
				history : false,
				cols : [{
					name : "Page RIC",
					field : "page_ric",
					type : "String",
					editable : true,
					editType : "SelectDropdown"
				}]
			}, {
				type : "form",
				contents : [{
					//title: "",
					schema : {
						primaryChain : {
							back : "ASSET.PRIMARYCHAIN.RIC",
							label : "Primary Chain",
							type : "SelectDropdown",
							elem_id : "primarychain",
							actions : [0, 3]
						},
						displayType : {
							back : "ASSET.DISPLAYTYPE",
							label : "Display Type",
							type : "SelectDropdown",
							elem_id : "displaytype",
							hasMeaning : true
						}
					}
				}]
			}]
		},
		crsUnit : {
			title : "Cross Unit Conversion",
			components : [{
				type : "table",
				id : "CRSUNIT",
				caption : "Cross Unit Conversion",
				actions : [2, 4],
				history : false,
				cols : [{
					name : "Type Name",
					field : "value",
					type : "String",
					editable : true,
					editType : "SelectDropdown",
					hasMeaning : true
				}, {
					name : "Type Meaning",
					field : "meaning",
					type : "String",
					relative : "value",
					editable : true,
					editType : "Content"
				}, {
					name : "Factor",
					field : "factor",
					type : "String",
					editable : true,
					editType : "Text"
				}]
			}]
		},
		assetRelationship : {
			title : "Asset Realtionship", ////////////////
			components : [{
				type : "form",
				contents : [{
					title : "Underlying Asset Relationship to Notional Product",
					schema : {
						assetRelationship_ric : {
							back : "ASSET.UNDERLYINGASSET.RIC",
							label : "RIC",
							type : "Text"
						},
						assetRelationship_category : {
							back : "ASSET.UNDERLYINGASSET.CATEGORY",
							label : "Category",
							type : "ViewDiv",
							hasMeaning : true
						}
					}
				}]
			}, {
				type : "table",
				id : "ASSET.UNDERLYING",
				caption : "Underlying Asset Relationship to Notional Product",
				history : true,
				cols : [{
					name : "Notional Product",
					field : "value",
					type : "String",
					editable : true,
					editType : "SelectDropdown"
				}, {
					name : "Meaning",
					field : "meaning",
					type : "String",
					relative : "value",
					editable : true,
					editType : "Content"
				}]
			}, {
				type : "table",
				id : "ASSET.RCSUNDERLYINGPRODUCT",
				caption : "Asset Relationship to RCS Underlying Product",
				history : true,
				cols : [{
					name : "RCS Underlying Product",
					field : "value",
					type : "String",
					editable : true,
					editType : "SelectDropdown"
				}, {
					name : "Meaning",
					field : "meaning",
					type : "String",
					relative : "value",
					editable : true,
					editType : "Content"
				}]
			}]
		},
		locations : {
			title : "Locations",
			components : [{
				type : "table",
				id : "LOCATIONS",
				caption : "Locations",
				actions : [1, 3, 4],
				cols : [{
					name : "Location Type",
					field : "type",
					type : "String",
					editable : true,
					editType : "SelectDropdown"
				}, {
					name : "Location Name",
					field : "value",
					type : "String",
					editable : true,
					editType : "SelectDropdown_l",
					hasMeaning : true
				}, {
					name : "Location Description",
					field : "meaning",
					type : "String",
					relative : "value",
					editable : true,
					editType : "Content"
				}]
			}]
		},
		miscellaneous : {
			title : "Miscellaneous",
			template : "miscellaneous", ////////////////
			components : [{
				type : "form",
				contents : [{
					title : "EM Admin Status",
					schema : {
						emadmin_status : {
							back : "",
							label : "EM Admin Status",
							type : "Text",
							readOnly : true
						},
						emadmin_meaning : {
							back : "",
							label : "EM Admin Status Meaning",
							type : "Text",
							readOnly : true
						},
						emadmin_begin_date : {
							back : "",
							label : "Begin Date",
							type : "Text",
							readOnly : true
						}
					}
				}, {
					title : "Time Series",
					schema : {
						timeseries_adjusted : {
							back : "",
							label : "Basic Gap Adjusted",
							type : "Checkbox",
							readOnly : true
						},
						timeseries_trigger : {
							back : "",
							label : "Basic Gap Adjustment Trigger",
							type : "Text",
							readOnly : true
						}
					}
				}]
			}]
		}
	}
};

var loadhistory = {
	title : "File Load History",
	sections : {
		loadhistory : {
			title : "File Load History", ////////////////
			alias : "File Load History",
			components : [{
				type : "form",
				contents : [{
					title : "Filter Items",
					schema : {
						createby : {
							back : "BULK.CREATEBY",
							label : "Create By",
							type : "Text"
						},
						createdate : {
							back : "BULK.CREATEDATE",
							label : "Create Date",
							type : "jqueryui.Date",
							validators : [/*'required',*/
							{
								type : "dateFormat",
								format : "dd-MM-yyyy"
							}]
						},
						modifydate : {
							back : "BULK.MODIFYDATE",
							label : "Modify Date",
							type : "jqueryui.Date",
							validators : [/*'required',*/
							{
								type : "dateFormat",
								format : "dd-MM-yyyy"
							}]
						},
						priority : {
							back : "BULK.PRORITY",
							label : "Prority",
							type : "Select",
							options: [1,2,3]
						}
					}
				}]
			}, {
				type : "table",
				id : "BULKLOADHISTORY",
				caption : "<div align='right'><button id='btnFHSearch' type='button' class='btn btn-small btn-primary'><i class='icon-search icon-white'></i><span>Search</span></button></div>",
				history : false,
				readOnly : true,
				cols : [{
					name : "ID",
					field : "nda_id",
					type : "String"
				}, {
					name : "File Type",
					field : "type",
					type : "String"
				}, {
					name : "Create Date",
					field : "create_date",
					type : "String"
				}, {
					name : "Create By",
					field : "create_by",
					type : "String"
				}, {
					name : "Modify Date",
					field : "modify_date",
					type : "String"
				}, {
					name : "Modify By",
					field : "modify_by",
					type : "String"
				}, {
					name : "File Name",
					field : "file_name",
					type : "String"
				}, {
					name : "Status",
					field : "status",
					type : "String"
				}, {
					name : "Priority",
					field : "priority",
					type : "String"
				}]
			}]
		}
	}
};

var bulkload = {
	title : "File Load History",
	sections : {
		loadhistory : {
			title : "File Load History", ////////////////
			alias : "FLH",
			components : [{
				type : "form",
				contents : [{
					title : "Filter Items",
					schema : {
						createby : {
							back : "BULK.CREATEBY",
							label : "Create By",
							type : "Text"
						},
						createdate : {
							back : "BULK.CREATEDATE",
							label : "Create Date",
							type : "jqueryui.Date",
							validators : [/*'required',*/
							{
								type : "dateFormat",
								format : "dd-MM-yyyy"
							}]
						},
						modifydate : {
							back : "BULK.MODIFYDATE",
							label : "Modify Date",
							type : "jqueryui.Date",
							validators : [/*'required',*/
							{
								type : "dateFormat",
								format : "dd-MM-yyyy"
							}]
						},
						priority : {
							back : "BULK.PRORITY",
							label : "Prority",
							type : "SelectDropdown",
							elem_id : "priority",
							
							clearable : false
						}//priority
					}
				}]
			}, {
				type : "table",
				id : "BULKLOADHISTORY",
				caption : "File Loaded History",
				history : true,
				readOnly : true,
				cols : [{
					name : "ID",
					field : "nda_id",
					type : "String"
				}, {
					name : "File Type",
					field : "type",
					type : "String"
				}, {
					name : "Create Date",
					field : "create_date",
					type : "String"
				}, {
					name : "Create By",
					field : "create_by",
					type : "String"
				}, {
					name : "Modify Date",
					field : "modify_date",
					type : "String"
				}, {
					name : "Modify By",
					field : "modify_by",
					type : "String"
				}, {
					name : "File Name",
					field : "file_name",
					type : "String"
				}, {
					name : "Status",
					field : "status",
					type : "String"
				}, {
					name : "Priority",
					field : "priority",
					type : "String"
				}]
			}]
		}
	}
};

var form_columns = {}; 